<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello Vue</title>
</head>
<body>

<div id="div1">
    <span style="color:red;" v-once>{{newText}}</span>
    <p style="color: blue">{{otherText}}</p>
    <input v-model="firstName">
    <p>{{fullNameMethod()}}</p>
    <p>{{fullNameMethod()}}</p>
    <p>{{fullNameComputed}}</p>
    <p>{{fullNameComputed}}</p>
</div>

<script src="https://unpkg.com/vue@next"></script>
<script type="text/javascript">
    // ES5
    // ES6 = ES2015
    const Model = {
        data() {
            return {
                newText: 'i\'m a new text',
                otherText: 'here is blue',
                firstName: 'jack',
                lastName: 'rose'
            }
        },
        methods: {
            fullNameMethod() {
                console.info("fullName method")
                return this.firstName + ' ' + this.lastName
            }
        },
        computed: {
            fullNameComputed() {
                console.info("fullName computed")
                return this.firstName + ' ' + this.lastName
            }
        }
    }

    Vue.createApp(Model).mount('#div1')
</script>
</body>
</html>